<script setup lang="ts">
import { onMounted } from 'vue';
import type {BuyShowItemType} from "@/type/lidare"
const props = defineProps<{
  item: BuyShowItemType
}>();
onMounted(() => {
  console.log(props.item);
})
</script>
<template>
  <div class="buy-show-item">
    <div class="first">
      <div class="img-box">
        <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="35px" height="35px">
          <image x="0px" y="0px" width="35px" height="35px"
            xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH5wMIECAXT/DRsAAAB9hJREFUWMOlmOtvXMUZxn8z55y92l6v7bXXOA6EBGgIIVwa7lUbhVRqK/GJv7OVqkqoQoWilgAlXBIlxE0ITmLHzvq2673vOTPz9sOs117bSUwZabR75j0z88x7m+c9SkSEozQnSLONbNaw9x7illZxa1VotBBjUWEIhRH0dJHg6Vn0fBk1WUDlsqDVkbYIj4RjvYr5+gb2xh1cZQupNZB2B7oxYgw4Aa1RUQiZFCqfRY2PosuThC8/T/Dar9AThSfuox6pGRGk3sJe/5Hk399jFxY9iDiBoyhTa1Q6QhXHCM6cJHr3FYLTJ1Cj+Z8Pxi1XSD7+kuTKDdzKOtKNh0AoNcD8hOOCymXQc9NEb58juvAGujx5NDBiLfbWfeK/fYb59iay3UCsAHJwFz/jkLG9YPvyIEBPjBG9+TKpP7xHcGIOAv14MObmIr2//ANz5QbS6hzNJEdtSqEKI0RvnSP9we8ITs0PiXcdWAS3XCH+66ckX19HWu2DyvilTQSp1Ukuf4eKAtIfXkLPlgbigZ6k3qL3989JrlxHmi1wzmtFXN8U0n+W3fGj9sF8B87hthvEX1wl/uQ/SKN1EExydYHkq2u4Wh1xDhFBZOdX+mN7uxy9O7dnTf/sNqrEX13D/PDTMBi3XiX+7ArmQ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HFUPgvV2j7u4hOeWVzGLK2gUj6s6fZQIznMvRWk2SfjuZyXmQSMQRLjTxuGYCySJEOcBuln4f7pdWGU4Ok5wvDEPHp8FPtgFXGHEBhnwVqiF095dVtH8NQMEse4jSquWvcOGwZIt4fKZ5E4QaVT6MIort7E3HuAXV07cFAAFQboqXHC+TJhMD1JMDdDcmsRTHeICO2dFMyV0WOjqEwKXZrsE6UGycId9EQBVRiFXoyeKiKNNqQjgqkirloHEexKZS/L2v2byRLMzaAni4RqJEf6/DniawuY5dV97G73IVm4g8rnUFHow1IppNvDVjbQtW1UNo10uqhsFoljn4lzOSSOsZV1DuX9ShGWS6RePYPK5wjRmvS7r9O7cg27WfUZ8zAw/72zT837Fz+EsO+5aL2mh31Sj42Rev0lUr8+C1p5cqWnimQuvUc4P9uP/30sbx+xErE8mfUN04oDhC1QhKeeJvPbN9FFX+ANCHnqldNkLryF3djCrm/8TDL+iDrwMYsE5WkyF94i9eJzg7EBGD02Su5PF7Frm7Q//pcnWzt2VurQKulAGaP21dSHyZUimJogc/Fdsu+/N1RhDtXawbEy+Q//iBhD55PP+4D8onKUzQ6o5qA8KE2S/f1vyH3wPkG5NCQ7WN5aS3J7kdafP6Lz6ZfYyrqnDr+0hSHhXJnsJQ8kOnH8yRXlANPyKq2P/kn3sy9Ibi3iGi1+niOpwY8ujJF64STZi++QvfQbgvL04TMe933G1RvEV2/S+fQyvSvXMKsVXLsL9giaCkN0Lkt4rEzmjVfJXnib6Mzz6JH/4yvEkJbWt+h9+S29qzcwyw+xlXXsVs3fTd0e4hwqCFCZNHok77PpTIlwfpb0a2dJnz+Hnhh/si6P/uXK4Rot3MYWyd1lzL0l7NqGZ4DGoqLQX3gzJaJn5gmPz3m6kc8NONCT2v8AbGKRCupa9kUAAAAASUVORK5CYII=" />
        </svg>
      </div>
      <div class="info">
        <div class="my-text name">{{ props.item.nickName }}</div>
        <div class="my-text proName">{{ props.item.proName }}</div>
      </div>
      <div class="btn">买同款</div>
    </div>
    <div class="des">{{ props.item.describe }}</div>
    <div class="imgs" v-if="props.item.pics?.length">
      <div class="imgs-box">
        <div class="img-box" v-for="(url,index) in props.item.pics.split(',')" :key="index" :style="{backgroundImage:`url(${url})`}"></div>
      </div>
    </div>
    <div class="time">{{ props.item.createTime }}</div>
  </div>
</template>
<style lang="scss" scoped>
.buy-show-item {
  width: 100%;
  box-sizing: border-box;
  padding: .1rem;
  background-color: var(--bgc-white);
  border-radius: .08rem;
  margin-bottom: .2rem;
  .first{
    display: flex;
    align-items: center;
    .img-box{
      width: .36rem;
      min-width: .36rem;
      height: .36rem;
      border-radius: 50%;
      overflow: hidden;
    }
    .info{
      flex-grow: 1;
      margin: 0 .1rem;
      color: var(--text-gray);
      .proName{
        font-size: .12rem;
        color: var(--text-gray2);
      }
    }
    .btn{
      min-width: .65rem;
      height: .24rem;
      font-size: .12rem;
      background-color: var(--bgc-red);
      color: var(--text-white);
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: .02rem;
    }
  }
  .des{
    font-size: .15rem;
    color: var(--text-black);
    margin: .2rem 0;
  }
  .imgs{
    width: 100%;
    margin: .1rem 0;
    overflow: scroll;
    &::-webkit-scrollbar{
      display: none;
    }
    .imgs-box{
      width: max-content;
      display: flex;
      .img-box{
        width: 1.1rem;
        min-width: 1.1rem;
        height: 1.04rem;
        border-radius: .08rem;
        overflow: hidden;
        margin-right: .1rem;
        &:last-child{
          margin-right: 0;
        }
      }
    }
  }
  .time{
    font-size: .12rem;
    color: var(--text-gray);
  }
}
</style>